package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entity.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @Author lizhilong
 * @create 2020/5/2 22:05
 * @desc
 */
@Slf4j
@RestController
public class PaymentController {

    @Value("${server.port}")
    private int serverPort;

    @GetMapping("/payment/consul")
    public CommonResult<String> consulPayment(){
        return CommonResult.success("spring cloud with consul" + serverPort + ">>>>" +UUID.randomUUID());
    }
}
